Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pfree char* returned by TextDatumGetCString in is_pgtle_defined_c_func. #222

Merged
merged 1 commit into from
Jul 24, 2023

Conversation

lyupan
Copy link
Contributor

@lyupan lyupan commented Jul 24, 2023

pfree char* returned by TextDatumGetCString in is_pgtle_defined_c_func.

Although this is unlikely to cause a memory leak (memory context will take care of releasing it), still be consevative and free the memory.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Although this is unlikely to cause a memory leak, still be consevative and free the memory.
@formalLogicGirl
Copy link
Contributor

Was this the only place or was there a second call site?

Will merge after checks complete

@lyupan
Copy link
Contributor Author

lyupan commented Jul 24, 2023

Was this the only place or was there a second call site?

Will merge after checks complete

I believe this is the only place we need this. There are a few TextDatumGetCString calls in datatype.c file, but they are not called in a loop, I don't think that's an issue at all.

@formalLogicGirl formalLogicGirl merged commit bd171b3 into aws:main Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants